package com.haoliang.spring.component.lifecycle.bean;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @Author zhaohaoliang
 * @Date 创建于 下午6:10 2019/3/10
 * @Description 请输入类的描述信息
 */
@Component
public class CatBean {

    public CatBean() {
        System.out.println("cat构造函数");
    }

    @PostConstruct
    public void init(){
        System.out.println("cat初始化方法");
    }

    @PreDestroy
    public void destroy(){
        System.out.println("cat销毁方法");
    }

}
